from django.conf.urls import url
from django.contrib import admin
from . views import index_views,list_views,info_views,personal_views

urlpatterns = [
    #官网
    url(r'^$', index_views.index,name='myhome_index'),
    #登录页面
    url(r'^login/$', index_views.myhome_login,name='myhome_login'),
    #退出登录 
    url(r'^loginout/$', index_views.loginout,name='myhome_out'),

    #注册页面
    url(r'^register/$', index_views.myhome_register,name='myhome_register'),
    #验证码
    url(r'^sendmsg/$', index_views.sendmsg,name='myhome_sendmsg'),
    # 商品列表
    url(r'^list/(?P<cid>[0-9]+)/(?P<bid>[0-9]+)/$', list_views.myhome_list,name='myhome_list'),
    url(r'^info/$', info_views.myhome_info,name='myhome_info'),

    #购物车
    url(r'^addcar/$', info_views.addcar,name='myhome_car'),
    url(r'^carpage/$', info_views.carpage,name='myhome_carpage'),
    url(r'^caredit/$', info_views.caredit,name='myhome_caredit'),

    #删除商品
    url(r'^delcart/$', info_views.delcart,name='myhome_delcart'),
    

    #订单相关
    url(r'^confirm/$', info_views.confirm,name='myhome_confirm'),

    # 获取城市地址
    url(r'^getcitys/$', info_views.getcitys,name='myhome_getcitys'),
    # 存地址
    url(r'^saveaddress/$', info_views.saveaddress,name='myhome_saveaddress'),
    
    # 生成订单
    url(r'^createorder/$', info_views.createorder,name='myhome_createorder'),
    # 删除地址
    url(r'^deldizhi/$', info_views.deldizhi,name='myhome_deldizhi'),

    # 支付页面
    url(r'^myhome_order_pay/$', info_views.myhome_order_pay,name='myhome_order_pay'),


    # 支付回调
    url(r'^order/pay_result/$',info_views.myhome_pay_result,name="myhome_pay_result"),

    #个人中心相关
    url(r'^personal/$', personal_views.personal,name='myhome_personal'),
    url(r'^information/$', personal_views.information,name='myhome_information'),

    # 订单管理
    url(r'^order/$', personal_views.order,name='myhome_order'),

    
    url(r'^delorder/$', personal_views.delorder,name='myhome_delorder'),

    #收货地址管理
    url(r'^address/$', personal_views.address,name='myhome_address'),














]
